<?php
require_once dirname(__FILE__)."/../../classes/Posts.class.php";
require_once dirname(__FILE__)."/../pagination/posts/posts_cat/pagination.php"; 
//получаем ID категории
$cat_id = $_GET['cat'];

$res = Posts::show_cat_posts($cat_id);
foreach($res as $value){
    $id = $value['id'];
    $title = $value['title'];
    $name = $value['name'];
    $cat = $value['cat_name'];
    $dt = $value['date_create'];
    $short = nl2br($value['short']);
    $content = $value['content'];
    $login = $value['login'];
    echo <<<LABEL
        <div class="post">
                        <div class="title"><a href="index.php?more=$id"><h2>$name</h2></a></div>
                        <p class="meta">Создал <a href="#">$login</a> &nbsp;&bull;&nbsp; $dt  &nbsp;&bull;&nbsp;
                        $cat 
                         <div class="entry">
                            <p>$short</p>
                            <p class="links"><a href="index.php?more=$id">Подробнее</a> </p>
                        </div>
       </div>
LABEL;

}  
?>
